/*
*    Phantom v2.0 GUI Automation Software
*    Copyright (C) 2009  John C. Van Arsdall (john@phantomtest.com)
*
*    This program is free software; you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License along
*    with this program; if not, write to the Free Software Foundation, Inc.,
*    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/

///////////////// WARNINGS ///////////////////////////////////
#define WARN00100  "Generic Warning"

#define WARN01000  "No log file open. (1000)"


#define MAKEWARN0(x)  String sErr; sErr.Format(x); return CStatus(sWARNING, sErr);
///////////////// ERRORS ///////////////////////////////////

#define ERR00100  "Generic Error"

#define ERR01000  "Unrecognized data type. (1000)"
#define ERR01001  "Unrecognized data type. (1001)"
#define ERR01002  "Internal Error. (1002)"
#define ERR01003  "Internal Error. (1003)"
#define ERR01004  "Stack overflow protection. Minimize recursive function calls.  (1004)"

#define ERR01100  "Class '%s' has not been declared. (1100)"
#define ERR01101  "Function '%s' already defined in %s. (1101)"
#define ERR01102  "Internal Error. (1102)"
#define ERR01103  "Internal Error. (1103)"
#define ERR01104  "Internal Error. (1104)"
#define ERR01105  "Variable '%s' not found. (1105)"
#define ERR01106  "Function '%s' not found. (1106)"
#define ERR01107  "Function '%s' not found or not available. (1107)"
#define ERR01108  "Function '%s' not found requiring parameters '%s'. (1108)"
#define ERR01109  "Variable '%s' not found. (1109)"
#define ERR01110  "Could not open file '%s'. (1110)"
#define ERR01111  "Error evaluating file '%s'. (1111)"
#define ERR01112  "Missing function return type. (1112)"
#define ERR01113  "Missing function return type. (1113)"
#define ERR01114  "Unrecognized return type: %s. (1114)"
#define ERR01115  "Invalid function declaration. (1115)"
#define ERR01116  "Missing function name. (1116)"
#define ERR01117  "Invalid function declaration. (1117)"
#define ERR01118  "Function parameter %d is invalid. (1118)"
#define ERR01119  "Missing type for function parameter %d. (1119)"
#define ERR01120  "Unrecognized variable type: %s. (1120)"
#define ERR01121  "Missing variable name for parameter %d. (1121)"
#define ERR01122  "Function end brace not found. (1122)"
#define ERR01123  "Function open brace not found. (1123)"
#define ERR01124  "Function end brace not found. (1124)"
#define ERR01125  "Error in function '%s'. (1125)"
#define ERR01126  "Variable name '%s' is invalid. (1126)"
#define ERR01127  "Function name '%s' is invalid. (1127)"

#define ERR02000  "Internal Error. (2000)"
#define ERR02001  "Internal Error. (2001)"
#define ERR02002  "Internal Error. (2002)"
#define ERR02003  "Internal Error. (2003)"
#define ERR02004  "Function '%s' already defined. (2004)"
#define ERR02005  "Function '%s' not found. (2005)"
#define ERR02006  "Internal Error. (2006)"
#define ERR02007  "Class '%s' not found. (2007)"
#define ERR02008  "Variable '%s' not found. (2008)"
#define ERR02009  "Internal Error. (2009)"
#define ERR02010  "Internal Error. (2010)"
#define ERR02012  "Operator not supported. (2012)"
#define ERR02013  "Variable '%s' not found. (2013)"
#define ERR02014  "Operator '%s' is not compatible with '%s' and '%s'. (2014)"
#define ERR02015  "Internal Error. (2015)"
#define ERR02016  "Internal Error. (2016)"
#define ERR02017  "Unrecognized statement '%s'. (2017)"
#define ERR02018  "Unrecognized statement '%s'. (2018)"
#define ERR02019  "Internal Error. (2019)"
#define ERR02020  "Unrecognized statement '%s'. (2020)"
#define ERR02021  "Operator '%s' not defined for '%s'. (2021)"
#define ERR02022  "Cannot compare '%s' and '%s'. (2022)"
#define ERR02023  "Cannot increment '%s'. (2023)"
#define ERR02024  "Cannot decrement '%s'. (2024)"
#define ERR02025  "Member variable '%s' already exists. (2025)"
#define ERR02026  "Variable '%s' already exists. (2026)"
#define ERR02027  "Variable '%s' already exists. (2027)"
#define ERR02028  "Variable '%s' already exists. (2028)"
#define ERR02029  "Unrecognized operator. (2029)"

#define ERR02100  "Could not open file '%s'. (2100)"
#define ERR02101  "Could not open file '%s'. (2101)"

#define ERR03000  "Bad 'else' statement. (3000)"
#define ERR03001  "Internal Error. (3001)"
#define ERR03002  "Unexpected ')'. (3002)"
#define ERR03003  "Expected: ')'. (3003)"
#define ERR03004  "Internal Error. (3004)"
#define ERR03005  "Expected: '%c'. (3005)"
#define ERR03006  "Expected: '%c'. (3006)"
#define ERR03007  "Unexpected end of file. (3007)"
#define ERR03008  "Expected: '%s'. (3008)"
#define ERR03009  "Expected: '%s'. (3009)"
#define ERR03010  "Incorrect else statement. (3010)"  // Change this one
#define ERR03011  "Unrecognized statement after 'else'. (3011)" // Change this one
#define ERR03012  "Internal Error. (3012)"
#define ERR03013  "Illegal 'else'. (3013)" // Change this one
#define ERR03014  "Internal Error. (3014)"
#define ERR03015  "Unexpected '%s'. (3015)"
#define ERR03100  "Missing '%s'. (3100)"
#define ERR03101  "Missing '%s'. (3101)"

#define ERR03200  "File name must be contained in quotes. (3200)"  // Change this one
#define ERR03201  "Expect '%s' at end of function. (3201)"
#define ERR03202  "Syntax Error. (3202)"
#define ERR03203  "Missing '%s' at end of class. (3203)"
#define ERR03204  "Syntax Error. (3204)"
#define ERR03205  "Expected: %s, %s, or %s. (3205)"
#define ERR03206  "Missing '%s'. (3206)"
#define ERR03207  "Missing '%s'. (3207)"
#define ERR03208  "Syntax Error. (3208)"
#define ERR03209  "Syntax Error. (3209)" // Change this one
#define ERR03210  "Syntax Error. (3210)" // Change this one
#define ERR03211  "Opening '%s' expected. (3211)"
#define ERR03212  "Opening '%s' not found. (3212)"
#define ERR03213  "Opening '%s' expected. (3213)"
#define ERR03214  "Opening '%s' not found. (3214)"
#define ERR03215  "Unexpected statement: '%s'. (3215)"

#define ERR03300  "Keyword '%s' already exists. (3300)"
#define ERR03301  "Variable type '%s' expects a name. (3301)"
#define ERR03302  "Variable type '%s' expects a name. (3302)"
#define ERR03303  "Function '%s' missing parameter list. (3303)"
#define ERR03304  "Function '%s' expects closing parenthesis. (3304)"
#define ERR03305  "Statement missing closing parenthesis. (3305)"
#define ERR03306  "Operator '%s' requires a variable on left. (3306)"
#define ERR03307  "Operator '%s' requires a variable on left. (3307)"
#define ERR03308  "Operator '%s' requires a variable or constant on right. (3308)"
#define ERR03309  "Operator '%s' requires a variable or constant on left. (3309)"
#define ERR03310  "Operator '%s' requires a variable or constant on right. (3310)"
#define ERR03311  "Operator '%s' requires a variable or constant on left. (3311)"
#define ERR03312  "Operator '%s' requires a variable or constant on right. (3312)"
#define ERR03313  "Missing ';' (%s). (3313)"
#define ERR03314  "Statement '%s' missing parameter list. (3314)"
#define ERR03315  "Missing closing brace. (3315)"
#define ERR03316  "Missing opening brace. (3316)"
#define ERR03317  "Statement 'if' missing opening parenthesis. (3317)"
#define ERR03318  "Statement 'if' missing closing parenthesis. (3318)"
#define ERR03319  "Statement 'for' missing opening parenthesis. (3319)"
#define ERR03320  "Statement 'for' missing closing parenthesis. (3320)"
#define ERR03321  "Statement 'while' missing opening parenthesis. (3321)"
#define ERR03322  "Statement 'while' missing closing parenthesis. (3322)"
#define ERR03323  "'%s' is not a member of '%s'. (3323)"
#define ERR03324  "Variable '%s' not found. (3324)"
#define ERR03325  "'%s' is not a member of '%s'. (3325)"
#define ERR03326  "Consecutive '%s' and '%s' illegal. (3326)"
#define ERR03327  "Consecutive '%s' and '%s' illegal. (3327)"
#define ERR03328  "Operator '%s' illegal here. (3328)"
#define ERR03329  "Operator '%s' illegal here. (3329)"
#define ERR03330  "Operator '%s' illegal here. (3330)"
#define ERR03331  "Operator '%s' illegal here. (3331)"
#define ERR03332  "Operator '%s' illegal here. (3332)"
#define ERR03333  "Function '%s' must return a '%s'. (3333)"
#define ERR03334  "Function '%s' must return a '%s'. (3334)"
#define ERR03335  "Member function '%s' must return a '%s'. (3335)"
#define ERR03336  "Member function '%s' must return a '%s'. (3336)"
#define ERR03337  "Consecutive '%s' operators illegal. (3337)"
#define ERR03338  "Function '%s' not found. (3338)"
#define ERR03339  "Operator '%s' illegal here. (3339)"
#define ERR03340  "Operator '%s' illegal here. (3340)"
#define ERR03341  "Modulous divide by zero. (3341)"
#define ERR03342  "Divide by zero. (3342)"
#define ERR03343  "Keyword requires a string parameter. (3343)"


#define ERR03380  "Statement 'catch' missing opening parenthesis. (3380)"
#define ERR03381  "Statement 'catch' missing closing parenthesis. (3381)"
#define ERR03382  "Statement 'catch' only accepts '%s' data type. (3382)"
#define ERR03383  "Statement 'try' must be followed by 'catch'. (3383)"
#define ERR03384  "Statement 'try' must be followed by 'catch'. (3384)"
#define ERR03385  "Statement 'catch' must follow a 'try'. (3385)"
#define ERR03386  "Statement 'catch' must follow a 'try'. (3386)"

#define ERR03390  "Statement 'package' must be followed by a string. (3390)"
#define ERR03391  "Statement 'package' must be followed by a non-empty string. (3391)"


#define ERR03400  "Could not close file. (3400)"
#define ERR03401  "Could not open file. (3401)"
#define ERR03402  "Could write to file. (3402)"

#define ERR03410  "Maximum path length (%d characters) exceeded. (3410)"
#define ERR03411  "Path does not contain a drive. (3411)"

#define ERR03500  "File '%s' not open. (3500)"
#define ERR03501  "Directory '%s' does not exist. (3501)"
#define ERR03502  "Incorrect bitmap Format. (3502)"
#define ERR03503  "Incorrect bitmap Format. (3503)"
#define ERR03504  "Incorrect bitmap Format. (3504)"

// ERRORS 5000+ reserved for external SSI errors
//Errors 5100-5110 for std_ofile_stream, std_file_stream
#define ERR05100  "Could not open file %s. (5100)"

//Errors 5111-5120 for CDataBitmap
#define ERR05111  "Bitmap save unsuccessful - %s. (5111)"
#define ERR05112  "Indices out of bitmap bounds: [%d,%d], [%d,%d]. (5112)"
#define ERR05113  "Color values must be from 0 to 255. (5113)"
#define ERR05114  "Index Y1 must be >= Y2 (Y1 = %d, Y2 = %d). (5114)"
#define ERR05115  "Index X1 must be >= X2 (X1 = %d, X2 = %d). (5115)"
#define ERR05116  "Invalid bitmap color depth. (5116)"
#define ERR05117  "Invalid bitmap color depth. (5117)"

#define ERR05130  "Blit origin must be >= 0. (5130)"
#define ERR05131  "Blit source will not fit at X,Y location. (5131)"
#define ERR05132  "Blit source and mask must have the same dimenstions. (5132)"
#define ERR05133  "The search start location must be > 0: %d, %d (5133)"
#define ERR05134  "ReplaceAll only supports 24-bit and 32-bit bitmaps (5134)"
#define ERR05135  "Color values must be from 0 to 255. (5135)"
#define ERR05136  "ReplaceAllOther only supports 24-bit and 32-bit bitmaps (5136)"
#define ERR05137  "Color values must be from 0 to 255. (5137)"
#define ERR05138  "Indices out of bitmap bounds: [%d,%d]. (5138)"
#define ERR05139  "Crop parameters greater than bitmap bounds. (5139)"
#define ERR05140  "Crop parameters greater than bitmap bounds. (5140)"
#define ERR05141  "Negative Crop parameters are invalid. (5141)"


//Errors 5121-5130 for CDataOptions
#define ERR05121  "Token must be a single character. (5121)"
#define ERR05122  "Comment indicator must be a single character. (5122)"
#define ERR05123  "Option index '%d' not found. (5123)"
#define ERR05124  "Option '%s' not found. (5124)"
#define ERR05125  "Option '%s' not found. (5125)"

#define MAKEERR0(x)  String sErr; sErr.Format(x); return CStatus(sERROR, sErr);
#define MAKEERR1(x, y)  String sErr; sErr.Format(x, y); return CStatus(sERROR, sErr);
#define MAKEERR2(x, y, z)  String sErr; sErr.Format(x, y, z); return CStatus(sERROR, sErr);
#define MAKEERR3(x, y, z, q)  String sErr; sErr.Format(x, y, z, q); return CStatus(sERROR, sErr);
#define MAKEERR4(x, y, z, q, r)  String sErr; sErr.Format(x, y, z, q, r); return CStatus(sERROR, sErr);



